package com.woniu.commentorder.mapper;

import com.hc.entity.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface GoodsMapper {
//    @Update("update hc_goods set stock=stock - #{num} where id = #{id}")
    void decreaseStock(@Param("num") int num, @Param("id") int id);
    @Update("update hc_goods set stock=stock + #{num} where id = #{id}")
    void increaseStock(@Param("num") int num, @Param("id") int id);
    Goods seleById(int id);



}
